SIP Domain Different Than Provider’s

Home » Asterisk Users » SIP Domain Different Than Provider’s
Asterisk Users 2 Comments

Hello,

I have what I would think would be a common situation: I run asterisk at home simply as a land line. I started a new job working remotely and they gave me a SIP account with user name, domain, and proxy. I’ve never had to deal with sip domains before. My user ‘140@4354766787.com’ is handled by a 3rd party provider: ‘sip.provider.com’ and my local domain on my asterisk box is the hostname ‘mypbxdomain.com’.

My normal extension I use for everything is just ‘111’. I figured the best way of joining my asterisk box was to just hard code in the extensions I would need to dial for my remote office work (there are only a couple of extensions so shouldn’t be a big deal).

However I struggled to get authentication working for outgoing calls to the few new extensions at the remote office through their provider. Looking at debug logs it was clear that the sip ‘To’ address was wrong. It had the provider: “To: ” instead of the domain which should look like: “To: ” (right?)

In the end, after hours of googling, reading the docs on sip.conf several times revealed a little spoke of ‘!’ dialplan option. Simply changing my dialplan from ‘Dial(SIP/workphone/${EXTEN})’ to
‘Dial(SIP/workphone/${EXTEN}!${EXTEN}@4354766787.com)’ fixed the issue.

But this seems really hackish. Is this the right/only way? Or is just having a provider and mismatched domains not really the norm?

I have an an anonymized log here: http://tinyurl.com/ouy2ajr

Regards, Sam

2 thoughts on - SIP Domain Different Than Provider’s

  • So since no one has responded, this either means one of two things:
    Either I am an idiot and missed something obvious and therefore no one wants to deal with me. Or this is indeed not something typical of an asterisk config.

    Can someone at least point me to which? 🙂
    As I mentioned, everything is working, it just doesn’t “feel” right.

    Regards, Sam

  • I think you chose the right solution in your case. It might doesn’t “feel” right if you corrected source code, I think.

    23.08.2015, 20:53, “Sam” :