***
Note: I was not allowed to submit my original post as it looked "spammy". I have substituted $ for dots in SIP addresses etc to get it accepted. Please read accordingly. Doesn't help the clarity I'm afraid.
***
I have PennyTel and DIDLogic set up as providers, and they are working fine both for outgoing and incoming calls. I would now like to distinguish between them so as to process incoming calls differently.
I read the Incoming Call Processing section of the Getting Started help and I believe I set things up accordingly:
I set up a sub-account xxxIncoming (xxx is actually something else) and made it incoming only with a dial plan that logs req$URI$User and then does sys$Dial to two other sub accounts that my phones register to.
My two providers are set up as:
1) DIDLogic with Register Contact as sip:DIDLogic$xxxIncoming@sipsorcery$com
2) PT-Untimed with Register Contact as sip:PT-Untimed$xxxIncoming@sipsorcery$com
Both Register Contacts show up in their respective entries in Sip Provider Registrations.
When I dial in from the Pennytel DID with the console running, req$URI$User is displayed as PT-Untimed$xxxIncoming and this is what I expected and hoped for.
When I dial in from the DIDLogic DID, req$URI$User is displayed as nnnnnn where nnnnnn is the username of the master account - I expected to see DIDLogic$xxxIncoming
I have tried using a different name for the DIDLogic provider, and also deleting and re-creating the provider. Nothing so far has changed the behaviour.
Could there be some issue specific to DIDLogic as a provider? Any other possibilities? I have spent a long time staring at my config, and if there is a mistake, I can't see it.
Register Contact set to sub account but apparently ignored
Re: Register Contact set to sub account but apparently ignor
Just Delete The Incoming Dial plan you don't need it.
You Just need 1 Sip Account and One Out Dial plan ( And the two sip providers registered ).
You Just need 1 Sip Account and One Out Dial plan ( And the two sip providers registered ).
Re: Register Contact set to sub account but apparently ignor
Some providers ignore what is set in the Contact header of the REGISTER request, which is where you have set sip:DIDLogic.xxxIncoming@sipsorcery.com, and instead forward calls with the destination SIP URI based on their own rules. In this case it sounds like DID Logic are forwarding calls as sip:didlogic_username@sipsorcery.com. You could try playing around with the Register Contact, perhaps by removing the "." to see if it gets respected, however to do that you will need to make sure you create a new SIP account at the sipsorcery end that matches whatever you set the Register Contact as.JerryT wrote: When I dial in from the DIDLogic DID, req$URI$User is displayed as nnnnnn where nnnnnn is the username of the master account - I expected to see DIDLogic$xxxIncoming
I have tried using a different name for the DIDLogic provider, and also deleting and re-creating the provider. Nothing so far has changed the behaviour.
Could there be some issue specific to DIDLogic as a provider? Any other possibilities? I have spent a long time staring at my config, and if there is a mistake, I can't see it.
You could also use a different mechanism to filter the incoming call in your dialplan. The hostname on the From header will probably contain something that identifies DID Logic as the source of the call and you can access that using req.Header.From.FromURI.Host.
Re: Register Contact set to sub account but apparently ignor
Thanks Aaron for the reply. I guess you are right and it is down to DIDLogic not respecting the register contact. At least Pennytel respects it, so I am able to discriminate on the basis of "if Pennytel then ... else <assume it's DIDLogic>. I am directing one DID to an overseas mobile and the other to home.