Tuesday 15 January 2013

Flowroute SIP trunks and UTF weirdness in Asterisk

On the off chance this helps the one other person in the world who finds themselves in the same situation, here's a small tip if you're using Flowroute as a SIP trunk and Asterisk 11. This will save you hours of staring at SIP debug traces (which have been proven to increase thoughts of suicide in sample groups).

Flowroute like you to use IP Authentication, which means you pre-approve your outgoing IP addresses with them and prefix your numbers with a tag, like 1234567#

Asterisk 11, in its infinite wisdom, converts that hash to its UTF equivalent: %23. This gets sent in the SIP packet, rendering it useless (or at least, not understood by Flowroute). You'll probably see some errors like:

SIP/2.0 404 Invalid dialing format
SIP/2.0 401 Unauthorized

You'll then spend a few hours scouring Digium's bug tracker and forums to find a variety of folks claiming that its already been fixed, or asking you to apply their own patch to chan_sip.c and recompile it. All you actually need to do is change the # to a * in the tag.

Asterisk 11 does not mess with it, and Flowroute accepts it.

Like I said, this may help no one ever, but if it does help one person, it might help them a lot.

1 comment:

  1. Thanks a lot for this! It did, in fact, help me a whole lot. It was weird because it occurred when Asterisk was updated-- no config changes, outbound just stopped working.

    ReplyDelete