internal call between sipsorcery subaccounts

Getting started with the SIP Sorcery
davidnewton
Posts: 179
Joined: Thu Aug 27, 2009 3:00 am

Re: internal call between sipsorcery subaccounts

Post by davidnewton » Fri May 28, 2010 3:52 am

beaver wrote:Add this line in dial-out plan. it works for me. I take my zip-code as my account number (easy to remember).
when /^\d{5}$/ then sys.Dial("${dst}@local")

I didn't use 7-dig, standard USA dial number in some areas. 6-dig has been used by voxalot. 5-dig is my only choice. As said, I use 2-dig speed-dial for
'99' => 'client1@local',
'98' => 'client2@local',
...
primary member call (some of them already use digits as account name). I really wish I cut my long speed-dial table.
Thanks a lot. I have tried to use the 5-digit sub-accounts to do the extension test. I have some weired problem: I have 4 different phones (xlite, e63, SPA3000 and PAP2T) to register different sub-accounts, all of them work fine calling outside DIDs using GVCallback. They also work without problems using those 5-digit sub-accounts registered outside the NAT. But if the phones registered inside the same NAT, then, some of them have one-way audio, or no audio at all, some work fine: SPA3000 works ok with all other 3 phones, PAP2T can not send audio out to xlite/e63 but can hear voice, between xlite and e63 there is no audio at all. I checked the setting and all the porting forwarding on the router, they all seem ok (SPA3000 and PAP2T have the identical setting excepting different rtp port range. I could not understand what cause the problem when the phones are inside the same NAT. All phones work fine to call outside.

beaver
Posts: 241
Joined: Tue Feb 09, 2010 5:32 am
Location: Beaverton USA (PST, GMT - 8)

Re: internal call between sipsorcery subaccounts

Post by beaver » Fri May 28, 2010 4:30 am

No audio, one-way audio, no ringing... it's not uncommon when all sip are behind the same NAT. And it's hard hard to fix all of them at the same time or at one setting. I observed this problem on various sip/voip vendors, sipsorcery, voxalot... all may have this problem if the setting is improper (voxalot users under the same us server even now still have this problem. But sounds no problem a user under eu server calls a user under au server (or us server, a non-eu server :lol: ).

In your case, I would play port# first, apply different port# on each sip/ata. try this fix first.

Also, each ata has its own preferable router (such as pap2 likes linksys router. might have a problem to work with a D-link router).

If they are behind different NAT, no problem to call each other at all (w/o using GB CB).
Last edited by beaver on Fri May 28, 2010 4:45 am, edited 1 time in total.

davidnewton
Posts: 179
Joined: Thu Aug 27, 2009 3:00 am

Re: internal call between sipsorcery subaccounts

Post by davidnewton » Fri May 28, 2010 4:42 am

Thanks. Right now, it is not big issue for me since my planned extensions will be at different locations and will have different ip addresses, so far, there is no audio problem to talk between these extensions. I am just curious about this issue for phones behind the same router. BTW, the router I am using is Netgear 3300 with dd-wrt flashed. Another router Asus wl520gu with Tomato connecting to the main router by WDS. Within my Lan network, the extensions in the Asterisk running on the Tomato router work ok. But I will try to find out the cause of the one-way audio problem for different phones with Sipsorcery sub-accounts.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: internal call between sipsorcery subaccounts

Post by Aaron » Fri May 28, 2010 4:51 am

NAT is the nemesis of SIP!

Two tricks for you when calling between devices behind the same NAT:

1. On each sipsorcery SIP account there is a setting called Network Id if two SIP accounts have the same value for that setting then the sipsorcery server will NOT mangle the IP address in the call request. Most of the time this will increase the likelihood of getting audio going directly between the two devices as the SIP INVITE request and response will be transmitted with the private IP address of each device. Note it doesn't matter what the Network Id value is just that it's the same for any set of devices. Also note that this approach is not infallible, if for example a device behind a NAT is using STUN it will often place the public IP address it detects in the call request and then it's back to square one and the sipsorcery server can't help,

2. To achieve the same thing but on a per call leg basis you can use a dial string option of [ma=false], ma stands for mangle. So in my dialplan for example I use extensions 100 and 101 to call between my two IP phones and because they are both on the same private network behind the same NAT I use:

Code: Select all

sys.Dial("myphone1@local[ma=false]")
sys.Dial("myphone2@local[ma=false]")
Regards,
Aaron

beaver
Posts: 241
Joined: Tue Feb 09, 2010 5:32 am
Location: Beaverton USA (PST, GMT - 8)

Re: internal call between sipsorcery subaccounts

Post by beaver » Fri May 28, 2010 4:58 am

Another thought. You can try to use pbxes.
If three of your four work ok but one (likely pap2) still has audio problem. set it this way: audio-->sipsorcery-->pbxes-->pap2. Last time I met audio problem on my pap2, I got it fixed this way. Using pbxes will also improve your sipsorcery audio reliability (no ringing, one-way audio, no audio..), believe or not. :mrgreen:

davidnewton
Posts: 179
Joined: Thu Aug 27, 2009 3:00 am

Re: internal call between sipsorcery subaccounts

Post by davidnewton » Fri May 28, 2010 6:37 pm

Aaron: Thanks a lot for the good explanation. I will try to use the non-mangling in the dialplan. I may need to make the dialplan a lit bit more complicated so that it can keep the mangling for calls to outside and no-mangling for inside calls. BTW, the Network ID for each SIP accounts is empty. Which value I could input for the network id? Thanks a lot for your great work. Sipsorcery is no doubt the best PBX I played so far. Right now I am studying if SS can do DISA.

beaver: Thanks for the advice. I will not try the pbxes since the system works ok for me. My curiosity about the problem is explained well by Aaron.

Regards,
David.

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: internal call between sipsorcery subaccounts

Post by Aaron » Fri May 28, 2010 10:19 pm

A blank Network Id value tells the sipsorcery to ignore it. as far as what values to use in it, anything really. As an example I use a value of home for all my phones on my home network.

sipsorcery can't do DISA.

Regards,
Aaron

AviMarcus
Posts: 153
Joined: Sun May 16, 2010 7:07 am

Re: internal call between sipsorcery subaccounts

Post by AviMarcus » Sat May 29, 2010 6:29 pm

DISA - you can (probably) set up a prompt via Tropo and pass it with a header in a blind transfer to SS. But beware of security stuff - you don't want others making toll calls on your dime.
Help document SIP Sorcery on the wiki!
If you solved an issue you were having or figured out how to do something, please share on the wiki! It will save everyone lots of time and frustration.

benifa
Posts: 99
Joined: Mon Jul 23, 2007 12:43 am

Re: internal call between sipsorcery subaccounts

Post by benifa » Sat Jun 18, 2011 12:28 pm

Aaron wrote:2. To achieve the same thing but on a per call leg basis you can use a dial string option of [ma=false], ma stands for mangle. So in my dialplan for example I use extensions 100 and 101 to call between my two IP phones and because they are both on the same private network behind the same NAT I use:

Code: Select all

sys.Dial("myphone1@local[ma=false]")
sys.Dial("myphone2@local[ma=false]")
Regards,
Aaron
Aaron, once again, thank you. I know this is an old thread but I searched and found exactly what I needed. Just wanted to say thanks.

Post Reply