1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wrong SIP channel Used

Discussion in 'Help' started by sukasem, May 19, 2011.

  1. sukasem

    sukasem Guru

    Joined:
    Sep 13, 2008
    Messages:
    143
    Likes Received:
    25
    Hi,

    I have problem with wrong sip channel used. I have 3 sip accounts with one provider (SIP/account1, SIP/account2, SIP/account3). let say, when I have incoming call on account 3 but sip channel used in asterisk show SIP/account1-xxxx.

    Is it normal? I think they're all have the same ip address so, asterisk pick up any channel.

    Is there a way to get asterisk to show correct channel.

    Thank you,
    Sukasem
     
  2. rossiv

    rossiv Guru

    Joined:
    Oct 26, 2008
    Messages:
    2,626
    Likes Received:
    138
    I don't think that is normal unless you have it configured to do that. You also don't provide much information. Could you please provide the information listed in my signature? Thanks!
     
  3. sukasem

    sukasem Guru

    Joined:
    Sep 13, 2008
    Messages:
    143
    Likes Received:
    25
    Hi,

    Sorry, about that. I'm running IPBX in VMware.

    Here is Status Screen
    Code:
    Status Version 1.2.9 released on Date 042310
    ********************************************************************
    *            PBX in a Flash Version  Daemon Status                 *
    *                      Running Asterisk 1.4                        *
    ********************************************************************
    * Asterisk  * ONLINE  * Zaptel    * ONLINE  * MySQL      * ONLINE  *
    * SSH       * ONLINE  * Apache    * ONLINE  * Iptables   * ONLINE  *
    * Fail2ban  * ONLINE  * IP Connect* ONLINE  * Ip6tables  * ONLINE  *
    * BlueTooth * ONLINE  * Hidd      * ONLINE  * NTPD       * ONLINE  *
    * Sendmail  * ONLINE  * Samba     * OFFLINE * Webmin     * ONLINE  *
    * Ethernet0 * ONLINE  * Ethernet1 *   N/A   * Wlan0      *   N/A   *
    ********************************************************************
    * Running Asterisk Version : Asterisk 1.4.21.2
    * Asterisk Source Version  : 1.4.21.2
    * Zaptel Source Version    : 1.4.12.1
    * Libpri Source Version    : 1.4.10.2
    * Addons Source Version    : 1.4.7
    ********************************************************************
    pbx.local on 192.168.1.100 - eth0
    CentOS release 5.4 (Final) :32 Bit Kernel: 2.6.18-92.1.22.el5vm
    ********************************************************************
     For help on PBX commands than you can run type help-pbx           *
    ********************************************************************
    root@pbx:~ $
    
    CLI screen when I call 14038794200

    Code:
         -- Executing [[B][COLOR="Red"]14038794200[/COLOR][/B]@from-pstn:1] [B][COLOR="Red"]Set("SIP/14038796616-b7d30970", "__FROM_DID=14038794200")[/COLOR][/B] in new stack
        -- Executing [14038794200@from-pstn:2] Gosub("SIP/14038796616-b7d30970", "app-blacklist-check|s|1") in new stack
        -- Executing [s@app-blacklist-check:1] LookupBlacklist("SIP/14038796616-b7d30970", "") in new stack
        -- Executing [s@app-blacklist-check:2] GotoIf("SIP/14038796616-b7d30970", "0?blacklisted") in new stack
        -- Executing [s@app-blacklist-check:3] Set("SIP/14038796616-b7d30970", "CALLED_BLACKLIST=1") in new stack
        -- Executing [s@app-blacklist-check:4] Return("SIP/14038796616-b7d30970", "") in new stack
        -- Executing [14038794200@from-pstn:3] ExecIf("SIP/14038796616-b7d30970", "0 |Set|CALLERID(name)=14038796677") in new stack
        -- Executing [14038794200@from-pstn:4] Set("SIP/14038796616-b7d30970", "__CALLINGPRES_SV=allowed_not_screened") in new stack
        -- Executing [14038794200@from-pstn:5] SetCallerPres("SIP/14038796616-b7d30970", "allowed_not_screened") in new stack
        -- Executing [14038794200@from-pstn:6] Goto("SIP/14038796616-b7d30970", "8794200-in|_X.|1") in new stack
        -- Goto (8794200-in,_X.,1)
        -- Executing [_X.@8794200-in:1] NoOp("SIP/14038796616-b7d30970", "Incoming Call from 14038796677") in new stack
        -- Executing [_X.@8794200-in:2] Set("SIP/14038796616-b7d30970", "CALLERID(num)=4038796677") in new stack
        -- Executing [_X.@8794200-in:3] System("SIP/14038796616-b7d30970", "echo "4038796677" > /tmp/cid") in new stack
        -- Executing [_X.@8794200-in:4] System("SIP/14038796616-b7d30970", "echo "somyong.thanuthai@gmail.com" > /tmp/email") in new stack
        -- Executing [_X.@8794200-in:5] Dial("SIP/14038796616-b7d30970", "SIP/14038794200/4032006824|28") in new stack
        -- Called 14038794200/4032006824
        -- SIP/14038794200-08ce1188 is making progress passing it to SIP/14038796616-b7d30970
      == Spawn extension (8794200-in, _X., 5) exited non-zero on 'SIP/14038796616-b7d30970'
        -- Executing [h@8794200-in:1] Goto("SIP/14038796616-b7d30970", "SendNotification|s|CANCEL") in new stack
    
    Trunk Name: 14038794200
    Peer Detail:
    Code:
    type=friend
    username=14038794200
    secret=xxxxxxx
    qualify=yes
    nat=yes
    insecure=port,invite
    host=voip.freephoneline.ca
    dtmfmode=inband
    context=from-pstn
    canreinvite=no
    disallow=all
    allow=g729&gsm&ulaw
    Here from sip peer:
    Code:
    14038796616/14038796616    208.65.240.142       N      5060     OK (72 ms)           
    14038795995/14038795995    208.65.240.142       N      5060     Unmonitored           
    14038794200/14038794200    208.65.240.142       N      5060     OK (58 ms)           
    101/101                    192.168.1.98     D   N   A  5061     OK (19 ms)   
    I don't know if you need any other screen.

    Thank you,
    Sukasem
     
  4. rossiv

    rossiv Guru

    Joined:
    Oct 26, 2008
    Messages:
    2,626
    Likes Received:
    138
    This is peculiar-
    Code:
    	   	14038796616/14038796616    208.65.240.142       N      5060     OK (72 ms)            14038795995/14038795995    208.65.240.142       N      5060     Unmonitored            14038794200/14038794200    208.65.240.142       N      5060     OK (58 ms)  
    
    Same IP, yet two are monitored, one is not. Is your trunk configuration the same for each trunk?
     
  5. sukasem

    sukasem Guru

    Joined:
    Sep 13, 2008
    Messages:
    143
    Likes Received:
    25
    Yes, same config, same provider, just one trunk I have qualify=no (unmonitored).
     
  6. jeffmac

    jeffmac Guru

    Joined:
    Jan 16, 2008
    Messages:
    214
    Likes Received:
    3
    There's been some discussion of this in the past. When Asterisk receives the invite it uses the originating IP address to match for a "peer" in your system. Unfortunately, you have three trunks connected to the same provider (I assume that IP is some provider) and Asterisk find the "first" peer (trunk) and concludes that is the appropriate entity.

    There were some folks that wanted to try defining their providers as "user" and "peer" separately to try to get Asterisk to look up the inbound request by username.

    I was not successful with that approach and resigned myself to Asterisk's trunk assignment. Since its just my account and my son's I don't need any separate accounting, and I don't use FOP to monitor my system. Otherwise everything seems to work just fine.

    If you need the additional accounting by trunk id or differentiation in FOP you should probably search the forums for the discussion from last year.

    Jeff
     
  7. sukasem

    sukasem Guru

    Joined:
    Sep 13, 2008
    Messages:
    143
    Likes Received:
    25
    Hi Jeff,

    Thank, at least I know it's not just me having this issue.

    Cheers,
    Sukasem
     

Share This Page