[asterisk-users] Calling SIP extension through Local/XXXX negotiates slin codec instead of gsm
I am configuring a test Asterisk server (1.8.9.2) to practice setting a single codec globally, to avoid transcoding as much as possible. Since all of my recordings are in gsm format, I am trying to make the SIP clients use gsm everywhere. I am using Ekiga on Fedora 16 x86_64 for my tests. [root@elx2 asterisk]# cat /etc/asterisk/sip_general_additional.conf ;; ; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ; ; this file must be done via the web gui. There are alternative files to make ; ; custom modifications, details at: http://freepbx.org/configuration_files ; ;; ; vmexten=*97 faxdetect=yes context=from-sip-external callerid=Unknown notifyringing=yes notifyhold=yes tos_sip=cs3 tos_audio=ef tos_video=af41 alwaysauthreject=yes useragent=FPBX-2.8.1(1.8.9.2) disallow=all allow=gsm allow=alaw allow=ulaw allow=g729 allow=g723 allow=g722 allow=speex I am using the originate command through the Asterisk console to test this. With plain SIP/1064, codec negotiation works as expected: elx2*CLI channel originate SIP/1064 application playback demo-congrats elx2*CLI core show channels Channel Location State Application(Data) SIP/1064-0044(None) Up Playback(demo-congrats) 1 active channel 0 active calls 86 calls processed elx2*CLI core show channel SIP/1064-0044 -- General -- Name: SIP/1064-0044 Type: SIP UniqueID: 1329515589.179 LinkedID: 1329515589.179 Caller ID: 1064 Caller ID Name: device Connected Line ID: (N/A) Connected Line ID Name: (N/A) DNID Digits: (N/A) Language: en State: Up (6) Rings: 0 NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264) WriteFormat: 0x2 (gsm) ReadFormat: 0x2 (gsm) WriteTranscode: No ReadTranscode: No 1st File Descriptor: 17 Frames in: 153 Frames out: 385 Time to Hangup: 0 Elapsed Time: 0h0m10s Direct Bridge: none Indirect Bridge: none -- PBX -- Context: from-internal Extension: Priority: 1 Call Group: 0 Pickup Group: 0 Application: Playback Data: demo-congrats Blocking in: ast_waitfor_nandfds Variables: SIPCALLID=14a13ecb635daaed76e6ab905ba0cff1@192.168.5.193:5060 CDR Variables: level 1: dnid= level 1: clid=device 1064 level 1: src=1064 level 1: dst=s level 1: dcontext=from-internal level 1: channel=SIP/1064-0044 level 1: lastapp=Playback level 1: lastdata=demo-congrats level 1: start=2012-02-17 16:53:09 level 1: answer=2012-02-17 16:53:11 level 1: duration=9 level 1: billsec=7 level 1: disposition=ANSWERED level 1: amaflags=DOCUMENTATION level 1: uniqueid=1329515589.179 level 1: linkedid=1329515589.179 level 1: sequence=217 However, when I use Local/@from-internal to call the same extension, I get a different codec: elx2*CLI channel originate Local/1064@from-internal application playback demo-congrats elx2*CLI core show channels Channel Location State Application(Data) SIP/1064-00431064@from-internal:1 Up Playback(demo-congrats) 1 active channel 0 active calls 86 calls processed elx2*CLI core show channel SIP/1064-0043 -- General -- Name: SIP/1064-0043 Type: SIP UniqueID: 1329515478.176 LinkedID: 1329515478.176 Caller ID: 1064 Caller ID Name: device Connected Line ID: (N/A) Connected Line ID Name: (N/A) DNID Digits: (N/A) Language: en State: Up (6) Rings: 0 NativeFormats: 0x3c0002 (gsm|h261|h263|h263p|h264) WriteFormat: 0x2 (gsm) ReadFormat: 0x40 (slin) WriteTranscode: No ReadTranscode: Yes gsm-slin 1st File Descriptor: 33 Frames in: 168 Frames out: 560 Time to Hangup: 0 Elapsed Time: 0h0m11s Direct Bridge: none Indirect Bridge: none -- PBX -- Context: from-internal Extension: 1064 Priority: 1 Call Group: 0 Pickup Group: 0 Application: Playback Data: demo-congrats Blocking in: ast_waitfor_nandfds Variables: MACRO_DEPTH=0 BRIDGEPEER=Local/1064@from-internal-49cb;2 DIALEDPEERNUMBER=1064 SIPCALLID=1166452b23d0a3e611e72eb05d812537@192.168.5.193:5060 KEEPCID=TRUE CWIGNORE= EXTTOCALL=1064 TTL=64 CDR Variables: level 1: dnid= level 1: clid=device 1064 level 1: src=1064 level 1: dst=s level 1: dcontext=from-internal level 1: channel=SIP/1064-0043 level 1: start=2012-02-17 16:51:20 level 1: duration=10 level 1: billsec=0 level 1: disposition=NO ANSWER level 1: amaflags=DOCUMENTATION level 1: uniqueid=1329515478.178 level 1: linkedid=1329515478.177 level 1: sequence=215 Why the difference? Is the client really using slin for one half of the stream? If so, how can I make it use gsm in the Local case? --
[Asterisk-Users] Calling SIP Address From Behind NAT
My asterisk box is behind a NAT firewall. I have friends that are on Earthlink, Vonage, etc. I'd like to make VOIP calls directly to them rather than going through the PSTN. With Earthlink, I can make this work through FWD peeting numbers, but that's sort of a waste of FWD bandwidth. WIth Vonage, it doesn't work. I suspect this is because of the breakage between FWD and Vonage that I saw mentioned on this list. But going through FWD seems like a hack. I'd like to contact them directly using SIP. Obviously this is difficult because of the NAT firewall. I'm running asterisk 1.0.2. In my sip.conf I've got localnet, localmask, and externip defined. If I turn on sip debug, it looks like the packets are getting rewritten correctly. My entry for vonage looks like this: [vonage] type=peer host=sip.vonage.net context=default canreinvite=no dtmfmode=rfc2833 insecure=very I tried telling my firewall to port forward all 5060 and 1-11000 (my RTP range) to my asterisk box, but that doesn't seem to make any difference. Is it necessary? The bottom line is that outgoing doesn't work and I haven't gotten to testing incoming calls yet. Any idea? Thanks - |Daryll ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Calling SIP
Thanks Eric. I'll configure my system for IAXTEL today and try it Have a great week end -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling Sent: Saturday, February 21, 2004 8:11 PM To: [EMAIL PROTECTED] Subject: RE: [Asterisk-Users] Calling SIP Thanks for the reminder, I forgot to change my web page and .sig when I moved. You can access my public demo services via 1) IAXTel 1-700-923-3656 x2101 2) PSTN 228-467-9866 x2101 or 3) (the recommended way) Dial(IAX2/[EMAIL PROTECTED]/2101) Not all the services are working, the call back demo is not available, and the weather report is missing some info since weather.com reworked their homepage. On Sat, 2004-02-21 at 18:19, Jacques Leisy wrote: Eric, I checked your page . Very interesting, thanks! I tried to call the number indicated ...IAXTel number 700-923-3645. My PSTN number is 850-484-4535. The extension for System Services is 2101... But I got a disconnected message. After that I called the number listed at the bottom of this email (850-484-4545) expecting a system prompt but a women answered the phone. Sorry for the inconvenience. If I want to try your scripts without bothering anyone, what is the proper # Thanks Jacques -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling Sent: Monday, February 09, 2004 2:38 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] Calling SIP That's just the way Asterisk's dial command works. On Mon, 2004-02-09 at 13:16, Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim -- Go to http://www.digium.com/index.php?menu=documentation and look at the Unofficial Links section. This section has links to a wide variety of 3rd party Asterisk related pages. My page is the Asterisk Resource Pages. BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Eric Wieling [EMAIL PROTECTED] BTEL Consulting ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Calling SIP
Eric, I checked your page . Very interesting, thanks! I tried to call the number indicated ...IAXTel number 700-923-3645. My PSTN number is 850-484-4535. The extension for System Services is 2101... But I got a disconnected message. After that I called the number listed at the bottom of this email (850-484-4545) expecting a system prompt but a women answered the phone. Sorry for the inconvenience. If I want to try your scripts without bothering anyone, what is the proper # Thanks Jacques -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling Sent: Monday, February 09, 2004 2:38 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] Calling SIP That's just the way Asterisk's dial command works. On Mon, 2004-02-09 at 13:16, Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim -- Go to http://www.digium.com/index.php?menu=documentation and look at the Unofficial Links section. This section has links to a wide variety of 3rd party Asterisk related pages. My page is the Asterisk Resource Pages. BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Calling SIP
Thanks for the reminder, I forgot to change my web page and .sig when I moved. You can access my public demo services via 1) IAXTel 1-700-923-3656 x2101 2) PSTN 228-467-9866 x2101 or 3) (the recommended way) Dial(IAX2/[EMAIL PROTECTED]/2101) Not all the services are working, the call back demo is not available, and the weather report is missing some info since weather.com reworked their homepage. On Sat, 2004-02-21 at 18:19, Jacques Leisy wrote: Eric, I checked your page . Very interesting, thanks! I tried to call the number indicated ...IAXTel number 700-923-3645. My PSTN number is 850-484-4535. The extension for System Services is 2101... But I got a disconnected message. After that I called the number listed at the bottom of this email (850-484-4545) expecting a system prompt but a women answered the phone. Sorry for the inconvenience. If I want to try your scripts without bothering anyone, what is the proper # Thanks Jacques -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling Sent: Monday, February 09, 2004 2:38 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] Calling SIP That's just the way Asterisk's dial command works. On Mon, 2004-02-09 at 13:16, Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim -- Go to http://www.digium.com/index.php?menu=documentation and look at the Unofficial Links section. This section has links to a wide variety of 3rd party Asterisk related pages. My page is the Asterisk Resource Pages. BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Eric Wieling [EMAIL PROTECTED] BTEL Consulting ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
If you wish to try out the callback script, I have a variation of it working. Please contact me off list if you are interested. Darren Wiebe [EMAIL PROTECTED] P.S. Eric, as soon as I make a bit of money off of this project I will forward some your way. Eric Wieling wrote: Thanks for the reminder, I forgot to change my web page and .sig when I moved. You can access my public demo services via 1) IAXTel 1-700-923-3656 x2101 2) PSTN 228-467-9866 x2101 or 3) (the recommended way) Dial(IAX2/[EMAIL PROTECTED]/2101) Not all the services are working, the call back demo is not available, and the weather report is missing some info since weather.com reworked their homepage. On Sat, 2004-02-21 at 18:19, Jacques Leisy wrote: Eric, I checked your page . Very interesting, thanks! I tried to call the number indicated ...IAXTel number 700-923-3645. My PSTN number is 850-484-4535. The extension for System Services is 2101... But I got a disconnected message. After that I called the number listed at the bottom of this email (850-484-4545) expecting a system prompt but a women answered the phone. Sorry for the inconvenience. If I want to try your scripts without bothering anyone, what is the proper # Thanks Jacques -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Wieling Sent: Monday, February 09, 2004 2:38 PM To: [EMAIL PROTECTED] Subject: Re: [Asterisk-Users] Calling SIP That's just the way Asterisk's dial command works. On Mon, 2004-02-09 at 13:16, Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim -- Go to http://www.digium.com/index.php?menu=documentation and look at the Unofficial Links section. This section has links to a wide variety of 3rd party Asterisk related pages. My page is the Asterisk Resource Pages. BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
That's just the way Asterisk's dial command works. On Mon, 2004-02-09 at 13:16, Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim -- Go to http://www.digium.com/index.php?menu=documentation and look at the Unofficial Links section. This section has links to a wide variety of 3rd party Asterisk related pages. My page is the Asterisk Resource Pages. BTEL Consulting 504-899-1387 or 850-484-4545 or 877-677-9643 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
On Mon, Feb 09, 2004 at 01:37:55PM -0600, Eric Wieling wrote: That's just the way Asterisk's dial command works. Hmm. I see. If it can't create the channel for either reason (busy or not registered), it's handled the same. I think I'll kludge up a perl script to watch the SIP channels register and unregister, and update a database table, which will be displayed on a web page to show who is actually active. Tim -- Tim Sailer Coastal Internet, Inc. Network and Systems Operations PO Box 726 http://www.buoy.comMoriches, NY 11955 [EMAIL PROTECTED] (631) 399-2910 (888) 924-3728 ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
Hi! I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? You are right, this is a true problem. There might be a workaround, however: As an illustration at the CLI do a database show SIP/Registry or refine this to database show SIP/Registry/username. Now use the same approach with DBget() in your dialplan. Of course this works only with dynamic SIP clients that do register; in case of static SIP clients you could use AGI or System() to ping the client first... In general I think this belongs into the discussion we need better = more detailed return codes from the Dial() command. Cheers, Philipp ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
Tim Sailer wrote: On Mon, Feb 09, 2004 at 01:37:55PM -0600, Eric Wieling wrote: That's just the way Asterisk's dial command works. Hmm. I see. If it can't create the channel for either reason (busy or not registered), it's handled the same. I think I'll kludge up a perl script to watch the SIP channels register and unregister, and update a database table, which will be displayed on a web page to show who is actually active. Use the manager API, test the chan_sip2 channel and you'll get a sippeers command to see who's online or not. /O ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
Tim Sailer wrote: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? I've heard the same from other sources. Maybe the fix to another problem in the SIP channel a week ago causes this. Mark? You know the 0.0.0.0 patch? I don't think it delivers unavailable if not registred. /O ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Calling SIP
Tim Sailer said: I've looked, poked, and hoped, but I can't seem to make * understand the difference between a SIP channel being busy or not being there. Both come up as 'busy'. I would expect the unregistered SIP to be seen as unavailable. Am I just missing something obvious, again? Tim ^ Tim, I use the following in my dialplan to distinguish between Unavailable (ie: did not answer), Busy and Channel doesn't exist. ChanisAvail goes to n+101 if the channel is NOT avail. There is probably a better way to exit the sequence but that is what works for me. exten = 11,1,Macro(stdexten,11,SIP/11) Below is the macro for the above... Have tested it with IAX2, SIP and MGCP. The first argument is the macro name, 2nd is the voicemailbox, 3rd is the Channel to dial. [macro-stdexten] exten = s,1,ChanisAvail(${ARG2}) exten = s,2,Dial(${ARG2},20,Ttr) exten = s,102,Voicemail2(u${ARG1}) exten = s,103,Hangup exten = s,104,Voicemail2(b${ARG1}) exten = s,105,Hangup LIke I said.. its messy but does work. Robert Friedrichshafen, Germany ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users