Topic: Stripping spaces from critical input fields [Comments: 2]
Sun, 02/08/2009 - 10:33 | Stripping spaces from critical input fields
Ran into a problem that had me going for a bit. We had a couple of tenants that could not make calls from their phones. Asterisk was sending the calls to our OpenSIPS SIP router as it should be then OpenSIPS was rejecting the message with an error about an bad From header. Turned up the debugging in my OpenSIPS config and found that the From SIP URI had a space - e.g.:
Note the space before the @ sign. Checked the Default Caller ID Number in their tenant setup and, sure enough, there was a trailing space on the phone number there. Removed that, saved the tenant, and problem was resolved.
So, it'd be great if you could make sure on such fields where spaces in the data are not valid, that PBX Mgr strips leading and tailing spaces from the input.