I asked this question once before with no answer. Hopefully someone can help me as I cannot see a way to do this. I am wanting to differentiate inbound calls voice from FAX. The purpose of course voice gets g729 and FAX gets 711 (ulaw). The problem I'm having is everytime it matches the SIP peer (like it should) but it's always goes to the prefered codec. Anyone have suggestions on how to force 711 for fax detection? Thanks. Matt
Eric Wieling aka ManxPower
2004-Dec-20 08:54 UTC
[Asterisk-Users] One SIP peer use 2 diff codecs?
Matt Schulte wrote:>I asked this question once before with no answer. Hopefully someone can >help me as I cannot see a way to do this. I am wanting to differentiate >inbound calls voice from FAX. The purpose of course voice gets g729 and >FAX gets 711 (ulaw). The problem I'm having is everytime it matches the >SIP peer (like it should) but it's always goes to the prefered codec. >Anyone have suggestions on how to force 711 for fax detection? > >You can't do this. --Eric
So what's the work around? Have faxes come from a diff IP? -----Original Message----- From: Eric Wieling aka ManxPower [mailto:eric@fnords.org] Sent: Monday, December 20, 2004 9:54 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] One SIP peer use 2 diff codecs? Matt Schulte wrote:>I asked this question once before with no answer. Hopefully someone can>help me as I cannot see a way to do this. I am wanting to differentiate>inbound calls voice from FAX. The purpose of course voice gets g729 and>FAX gets 711 (ulaw). The problem I'm having is everytime it matches the>SIP peer (like it should) but it's always goes to the prefered codec. >Anyone have suggestions on how to force 711 for fax detection? > >You can't do this. --Eric _______________________________________________ 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
Now that I finally have someones attention :) I can explain the rest. The problem is I'm sending calls out through SER (with digest of course). So in my sip.conf I have: [sipfarm] insecure=very ; Because SER inbound doesn't know how to auth host=blah.blah.net type=peer context=incoming username=+1314XXXXXXX secret=XXXXXXXXXXX canreinvite=no disallow=all allow=g729 allow=ulaw The problem is I have to Dial(SIP) *and* pass digest auth to SER, which means I have to specify host=blah.blah.net in sip.conf for sipfarm. Unless there's a way to pass Digest via Dial(SIP) cmd... two peers inbound won't work because host= will always match.. Ideas? Thanks for your input :-) Matt -----Original Message----- From: Eric Wieling aka ManxPower [mailto:eric@fnords.org] Sent: Monday, December 20, 2004 11:27 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] One SIP peer use 2 diff codecs? Matt Schulte wrote:>So what's the work around? Have faxes come from a diff IP? > >Well have them come into a different user/friend at least. The IP can be the same if you are authenticating on username/secret rather than IP. _______________________________________________ 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
Give the FAX SIP device a different account and force it to Ulaw. For example if the user was account 1111 you could create 1111F for fax and 1111V for voice and have sperate allow/deny codecs
Roy Sigurd Karlsbakk
2004-Dec-20 11:56 UTC
[Asterisk-Users] One SIP peer use 2 diff codecs?
> I asked this question once before with no answer. Hopefully someone can > help me as I cannot see a way to do this. I am wanting to differentiate > inbound calls voice from FAX. The purpose of course voice gets g729 and > FAX gets 711 (ulaw). The problem I'm having is everytime it matches the > SIP peer (like it should) but it's always goes to the prefered codec. > Anyone have suggestions on how to force 711 for fax detection?exten fax,1,SetVar(SIP_CODEC=alaw) exten fax,2, ... AFAIK, this is implemented for outgoing calls only, although I don't think it'll be too hard to do it on incoming also. roy
Roy Sigurd Karlsbakk
2004-Dec-22 04:24 UTC
[Asterisk-Users] One SIP peer use 2 diff codecs?
>> How about this variable? :-) >> ${SIP_CODEC}: Used to set the SIP codec for a call > > That only works for calls going OUT from Asterisk. It does nothing > for incoming calls. By the time the dialplan is called the codec is > already set.perhaps tha should be changed, then, to allow more control over codec handling? roy
Here, here, I agree. Each channel should be able to decide which codec to try first. This will cause more call setup messages. 1. Hi, do you have GSM? No 2. Hi again, do you have G.723 No, go Fish. 3. Hmmm, do you have (cringe) G.729? Yes, do you have License for your Minkey? My understanding of SIP is that the caller suggests, the callee replies with their preference(s). So the call setup is a little more complicated but not that hard to do, just need some routing logic on the caller side. Sort of the way a gatekeeper decides where to route a call. Race -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Roy Sigurd Karlsbakk Sent: 22 December 2004 06:25 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] One SIP peer use 2 diff codecs?>> How about this variable? :-) >> ${SIP_CODEC}: Used to set the SIP codec for a call > > That only works for calls going OUT from Asterisk. It does nothing > for incoming calls. By the time the dialplan is called the codec is > already set.perhaps tha should be changed, then, to allow more control over codec handling? roy _______________________________________________ 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