Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: jibe on July 11, 2008, 11:53:25 AM
-
Hi,
I have a problem creating a trunk for an outgoing SIP line... Curiously, if I make a mistake in the user or password, the trunk appears as connected in the server-manager. If I put
the right values, it does not get connected... Seems to work well however, but if I want to add an incoming part to this trunk, incoming calls are not working...
Here is my sip.conf (with of course modified identifiers) :
[general]
disallow=all
allow=alaw
tos_sip=cs3
tos_audio=ef
tos_video=af41
localnet=192.168.1.0/255.255.255.0
context=mainmenu
maxexpirey=360
defaultexpirey=320
language=fr
videosupport=yes
limitonpeers=yes
notifyringing=yes
notifybusy=yes
register => 1001-1234567abc:AB1CdeFGH2IJ3KLmNOPqRStuv@sip.laligne.fr
[SIP_laligne]
type=friend
host=sip.laligne.fr
qualify=yes
nat=yes
insecure=very
canreinvite=no
username=1001-1234567abc
user=1001-1234567abc
fromuser=1001-1234567abc
secret=AB1CdeFGH2IJ3KLmNOPqRStuv
dtmfmode=RFC2833
disallow=all
allow=alaw
allow=ulaw
Very curiously, Asterisk seems to register it correctly :
*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
SIP_laligne/1001-1234567a 79.170.113.121 N 5060 OK (81 ms)
*CLI> sip show registry
Host Username Refresh State Reg.Time
sip.laligne.fr:5060 1001-1234567 305 Registered Fri, 11 Jul 2008 11:27:33
*CLI>
As shown in the console, Asterisk retrieves the IP address, but this address is not shown in the server manager...
-
which release of sail do you have?
-
Hey, I thought about that, but don't know how to find it :oops:
Maybe this way ?
# rpm -qa | grep sail
sail-2.2.1-625
-
Bring your release up to 640, the trunk processing is better.
For incoming you will need to figure out what your carrier is sending in to you in the SIP invite. This will almost certainly be either the DiD (telephone number) or the account number. Once you know which one it is you can simply create a PTT-DiD trunk to receive the call and process it onwards.
You can figure it out yourself by either running a SIP packet trace with wireshark or, if your PBX is not busy, by running sip debug at the asterisk console.
Kind Regards
-
It's about 3 weeks that I installed it, and the version is already 640 ! Ok, I'll see how to upgrade and let you know if it's working.
By the way, why isn't it automatically updated by yum from the server-manager, as other parts of the SME ? (well, maybe I should check if the right repository is active !)
-
It's about 3 weeks that I installed it, and the version is already 640
Actually, we'll release -648/9 this weekend
By the way, why isn't it automatically updated by yum from the server-manager, as other parts of the SME ?
No we don't have a repo. You have to download the rpm and install it locally with yum localinstall
Kind Regards
-
Hi,
Thanks : I updated to 647 and it's working :-)
But I cannot get incoming calls working... I don't see anything in CLI when somebody calls on this line... Seems that all is Ok with the SIP provider.
Did I missed something ? (pls, see my sip.conf in the first post)
Is nat=yes ok ? As SME is gateway, I don't know exactly if Asterisk is before or after nating ?
-
I already answered this...
For incoming you will need to figure out what your carrier is sending in to you in the SIP invite. This will almost certainly be either the DiD (telephone number) or the account number. Once you know which one it is you can simply create a PTT-DiD trunk to receive the call and process it onwards.
nat=yes shouldn't make any difference with most carriers. It is really there to support remote phones.
-
I already answered this...
:oops: Sorry ! I was not precise enough...
I can't see anything in the console, with debug level 27. So, I think that something is going wrong ? I cannot know what is sent, DID or account number.
Ok, I could ask to the provider what he sends, but if I see nothing in the Asterisk console, I'm afraid that it will not work anyway ?
-
As I said, I've already answered this..
You can figure it out yourself by either running a SIP packet trace with wireshark or, if your PBX is not busy, by running sip debug at the asterisk console.
-
Hi,
I'm sorry to look so stupid ! Not yet used to Asterisk, and more especially to its console, I was not doing well to have the right debug level :oops:
Well, I got the messages when a call occurs. Here is the begining of the exchange :
<--- SIP read from 79.170.113.121:5060 --->
INVITE sip:s@90.10.159.8 SIP/2.0
Via: SIP/2.0/UDP 79.170.113.121:5060;branch=z9hG4bK4b05538f;rport
From: "33450123456" <sip:33450123456@79.170.113.121>;tag=as29ec4e6d
To: <sip:s@90.10.159.8>
Contact: <sip:33450123456@79.170.113.121>
Call-ID: 652a27a852f9e3db729d845341be9055@79.170.113.121
CSeq: 102 INVITE
User-Agent: voip.2A.laligne.fr
Max-Forwards: 70
Date: Wed, 16 Jul 2008 16:49:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 340
v=0
o=root 15250 15250 IN IP4 79.170.113.121
s=session
c=IN IP4 79.170.113.121
t=0 0
m=audio 14984 RTP/AVP 8 3 111 97 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
--- (14 headers 16 lines) ---
Sending to 79.170.113.121 : 5060 (NAT)
Using INVITE request as basis request - 652a27a852f9e3db729d845341be9055@79.170.113.121
Found peer 'SIP_laligne'
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 111
Found RTP audio format 97
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 79.170.113.121:14984
Found audio description format PCMA for ID 8
Found audio description format GSM for ID 3
Found audio description format G726-32 for ID 111
Found audio description format iLBC for ID 97
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0xc0e (gsm|ulaw|alaw|g726|ilbc)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 79.170.113.121:14984
Looking for s in mainmenu (domain 90.10.159.8)
list_route: hop: <sip:33450123456@79.170.113.121>
<--- Transmitting (NAT) to 79.170.113.121:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 79.170.113.121:5060;branch=z9hG4bK4b05538f;received=79.170.113.121;rport=5060
From: "33450123456" <sip:33450123456@79.170.113.121>;tag=as29ec4e6d
To: <sip:s@90.10.159.8>
Call-ID: 652a27a852f9e3db729d845341be9055@79.170.113.121
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s@90.10.159.8>
Content-Length: 0
Please, could you point me what I must use for the PTT-DID trunk ? I don't see any DID or account number... Or am I still doing something wrong or misunderstanding what you said ?
Thanks for your patience !
-
Hello,
You will need to speak to your carrier (Laligne?). Let me try to explain why...
Here is your sip invite from the carrier...
<--- SIP read from 79.170.113.121:5060 --->
INVITE sip:s@90.10.159.8 SIP/2.0
Via: SIP/2.0/UDP 79.170.113.121:5060;branch=z9hG4bK4b05538f;rport
From: "33450123456" <sip:33450123456@79.170.113.121>;tag=as29ec4e6d
To: <sip:s@90.10.159.8>
Contact: <sip:33450123456@79.170.113.121>
Call-ID: 652a27a852f9e3db729d845341be9055@79.170.113.121
CSeq: 102 INVITE
User-Agent: voip.2A.laligne.fr
Max-Forwards: 70
Date: Wed, 16 Jul 2008 16:49:46 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 340
Here is one from one of our carriers (Telappliant)...
<--- SIP read from 217.14.132.185:5060 --->
INVITE sip:02070992547@79.121.247.56 SIP/2.0
Via: SIP/2.0/UDP 217.14.132.185:5060;branch=z9hG4bK41d3490f;rport
From: "01924514414" <sip:01924514414@217.14.132.185>;tag=as49a507d3
To: <sip:02070992547@79.121.247.56>
Contact: <sip:01924514414@217.14.132.185:5060>
Call-ID: 35954af35c4b5ad830bc9550127c7ed8@217.14.132.185
CSeq: 102 INVITE
User-Agent: Telappliant VoIP Gateway
Max-Forwards: 70
Date: Thu, 17 Jul 2008 08:59:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Type: application/sdp
Content-Length: 340
Notice the two INVITE lines ...
yours...
INVITE sip:s@90.10.159.8 SIP/2.0
Ours...
INVITE sip:02070992547@79.121.247.56 SIP/2.0
Your carrier is not giving you a value in the invite (normally this is either the dialled number or the account number). SARK will not accept Invites like this (known as unauthorised, or unsolicited).
You need to speak to the carrier and ask them how to put the DNID (Dialed Number ID) or Account ID into the INVITE. Usually this is just a question of tagging the registration string - like this...
register=>username:pwd@carrier/tag
You can simply put the DNID into the tag.
Either way, once you've agreed with your carrier how to do this then you just create a PTT_DiD with the tag as the key (in our case above we have a PTT-DiD with the value 02070992547)
Hope this all makes sense.
Kind Regards
S
-
Thanks !
Yes, I understand ! I'll see that with laligne.fr and let you know.
-
I added my DNID as tag in the registration string, and it's working :smile:
Thanks for your kind help :smile:
-
Hi,
This is working very well. But now, I worry how to have DID working...
I have now this registration string :
user:password@carrier/0123456780
and my PTT-DID trunk was created with :
DID number start : 0123456780
DID number end : 0123456780
Then I modified it and put in Open/Close Inbound route: 5010
Now, I got some other numbers and I want :
0123456780 to ring 5010 extention,
0123456781 to ring 5003 extention,
0123456782 to ring 5006 extention
and so on...
I read this chapter of the doc (http://aelintra.com/docs/cgi-bin/view/Main/DocChapter2517), but I don't understand how I can obtain this...
I think that I'll have to modify my PTT-DID trunk [0123456780], but I don't understand how
- to change the DID number end (no more access when I edit... Must I delete it and re-create ?)
- to make so that the right extension will ring depending on the DNID ?
Thank you to give me some more detailed explanations... Or pointing me on a part of the doc that I missed ?
-
Just add the new DiDs.
You already have ...80 just add ...81 thru ...89
I'm not sure how your carrier will deliver them, but usually they just arrive in the SIP INVITE.
Just try it using the techniques I showed you above.
Best
-
Hi,
Just add the new DiDs.
You already have ...80 just add ...81 thru ...89
Excuse me, what do you mean exactly ? I have to add new PTT-DIDs, one for each, or to add the DIDs in the existing PTT-DID ?
If I must just add the DIDs in the already created PTT-DID, how can I do ? Seems not possible just while editing it ? And then, how will I do so that the right extention rings ?